from htmock.models import MockResource


class MockCleanupMiddleware(object):
    """Deletes old mocks from the database on every request."""
    def process_request(self, request):
        MockResource.objects.delete_old()
